package com.ruoyi.bbsAdmin.service;


import com.ruoyi.bbsAdmin.domain.Content;
import com.ruoyi.bbsAdmin.domain.UserSchool;
import com.ruoyi.bbsAdmin.domain.bbs_user;
import com.ruoyi.bbsAdmin.domain.vo.contentRedisVo;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface RedisService {

    int addOneWeekHomeContentToRedis(int schoolId, String queryTime);

    int deleteHomeContentInRedisOneWeekAgo(Integer schoolId);


    int addHomeContentToRedis(String contentId); //单体新增
    int addHomeContentListToRedis(List<contentRedisVo> homeContentVOList); //列表新增
    int deleteHomeContentInRedis(double timestampInRedis ,String contentId); //单体删除
    int deleteHomeContentListInRedis(double timestamp, int schoolId); //按条件批量删除(删除redis中时间戳小于传入时间戳的帖子列表)
    int updateHomeContentInRedis(double timestampInRedis , String contentId );


    int addMainCommentToRedis(int schoolId,String contentId,String commentId); //单体新增
    int deleteMainCommentInRedis(int schoolId,String contentId,String commentId,double timestampInRedis);
    int updateMainCommentInRedis(int schoolId,String contentId,String commentId,double timestampInRedis);


    int updateChildrenCommentInRedis(int schoolId,String contentId,String commentId,double timestampInRedis);


    int updateSomeUserInfoInRedis(String userId, Map<String,String> updateInfo);
    int updateUserInfoInRedis(bbs_user userInfo);
    int updateUserSchoolInfoInRedis(UserSchool userSchoolInfo);

    int updateContentInfoInRedis(String contentId);

    Boolean deleteSchoolListInRedis();
}
